<?php

/**
 * 下载记录
 */
class DownloadAR extends CActiveRecord {
	public static function model($className=__CLASS__){
		return parent::model($className);
	}

	public function tableName(){
		return self::tblName();
	}
	
	public static function tblName(){
		return 'ccs8_download';
	}
	
	public static function persist($userId,$bookId){
		$props = array('fk_user'=>$userId,'fk_book'=>$bookId,'ctime'=>time());
		DBUtil::insert(self::tblName(),$props);
	}

}